<?php
	include '../controllers/DBController.php';
	
	$letter = $_REQUEST['letter'];
	$category = $_REQUEST['category'];
	$wordsJson = json_encode(getWordsByLetter($letter, $category));
	echo "{\"words\":".$wordsJson.",\"letter\":\"$letter\",\"category\":\"$category\"}";
?>